package cn.cloudbae.config;

import javax.sql.DataSource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.dangdang.ddframe.job.event.JobEventConfiguration;
import com.dangdang.ddframe.job.event.rdb.JobEventRdbConfiguration;

@Configuration
public class JobEventConfig {
	
	 @Autowired 
	 private DataSource ds;
	
	@Bean(name="jobEventConfiguration")
	public JobEventConfiguration getJobEventConfiguration() {
		return new JobEventRdbConfiguration(ds);
	}
}
